import {
  BasicLayout, RouteView, PageView, UserLayout,
} from '@/layouts';
import dashboard from './modules/dashboard'
// import AdminManage from './modules/AdminManage'
// import Root from './modules/Root'

import SystemConfig from './modules/SystemConfig'
import HospitalManage from './modules/HospitalManage'
import HospitalProcure from './modules/HospitalProcure'
import ShopGoods from './modules/ShopGoods'
import Classification from './modules/Classification'
import ProductBrand from './modules/ProductBrand'
import OrderManage from './modules/Order'
// userList
 
export const RoutersMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/dashboard/workplace',
    // hideChildrenInMenu: true,
    children: [
      dashboard,
      // AdminManage,
      // Root,
      // SystemConfig,
      // HospitalManage,
      // HospitalProcure,
      // Classification,
      // ProductBrand,
      ShopGoods,
      // OrderManage,
      {
        path: '/form',
        redirect: '/form/base-form',
        component: RouteView,
        meta: { title: 'Exception', icon: 'icon-dashboard' },
        hidden: true,
        children: [
          {
            path: '/form/base-form',
            name: 'BaseForm',
            component: resolve => require(['@/views/exception/403'], resolve),
            meta: { title: '403', keepAlive: true },
          },
          {
            path: '/form/step-form',
            name: 'StepForm',
            component: resolve => require(['@/views/exception/404'], resolve),
            meta: { title: '404', keepAlive: true },
          },
          {
            path: '/form/advanced-form',
            name: 'AdvanceForm',
            component: resolve => require(['@/views/exception/500'], resolve),
            meta: { title: '500', keepAlive: true },
          },
        ],
      },
    ],
  },
  {
    path: '/passport',
    component: UserLayout,
    redirect: '/passport',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        // component: () => import('@/views/passport/Login'),
        component: resolve => require(['@/views/passport/Login'], resolve),
      },
      {
        path: 'register',
        name: 'register',
        // component: () => import(/* webpackChunkName: "user" */ '@/views/passport/Register'),
        component: resolve => require(['@/views/passport/Register'], resolve),
      },
      {
        path: 'register-result',
        name: 'registerResult',
        // component: () => import(/* webpackChunkName: "user" */ '@/views/passport/RegisterResult'),
        component: resolve => require(['@/views/passport/RegisterResult'], resolve),
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined,
      },
    ],
  },
  {
    path: '*', redirect: '/form/step-form', hidden: true,
  },
];
